<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 避免IE使用兼容模式 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<meta name="renderer" content="webkit">
<!-- 先前的备份代码，两个下拉的联动，在D:\MyWork\01张凯的项目与原型开发工具\20181206代码临时过渡备份\中保存 -->
</head>
<body>
    <div class="topjui-fluid">
        <fieldset>
            <legend>消息发布</legend>
        </fieldset>
		<!-- 
        <div class="topjui-row">
            <div class="topjui-col-sm8">
                <label class="topjui-form-label">消息类型：</label>
                <div class="topjui-input-block">
                <input type="hidden" name="infotypename" id="infotypename">
				<input type="text" name="infotypeid" id="infotypeid"
                           data-toggle="topjui-combobox"
                           data-options="required:true,prompt:'必填',
                           	   data:[{value:'1',text:'公共消息'},{value:'2',text:'通知消息'}],
                       		   panelHeight:80,
		                       onSelect:function(node){
		                       	$('#infotypename').val(node.text);
		                       	$('#infotypeid').val(node.value);
		                       	//alert($('#infotypename').val()+'   '+$('#infotypeid').val());
		                       },
                           ">
                </div>
            </div>
        </div>
         -->
        <div class="topjui-row">
            <div class="topjui-col-sm8">
                <label class="topjui-form-label">消息标题：</label>
                <div class="topjui-input-block">
				<input id="title" type="text" name="title"
                           style="" class="textbox-f" data-toggle="topjui-textbox"
                           data-options="required:true,prompt:'必填',validType:'maxLength[30]'"  />
                </div>
            </div>
        </div>
		<!-- 
        <div class="topjui-row">
            <div class="topjui-col-sm8">
                <label class="topjui-form-label">副标题（简介）：</label>
                <div class="topjui-input-block">
				<input id="abs" type="text" name="abs"
                           style="" class="textbox-f" data-toggle="topjui-textbox"
                           data-options="required:true,prompt:'必填'"  />
                </div>
            </div>
        </div>
		 -->
        <div class="topjui-row">
            <div class="topjui-col-sm8">
                <label class="topjui-form-label">消息内容：</label>
                <div class="topjui-input-block">
				<input id="content" type="text" name="content"
                           style="" class="textbox-f" data-toggle="topjui-textbox"
                           data-options="required:true,prompt:'必填',
                           				 height:150,
                           				 multiline:true,validType:'maxLength[500]'
                                         "/>
                </div>
            </div>
        </div>

        <div class="topjui-row">
            <div class="topjui-col-sm4">
                <label class="topjui-form-label">通知人员：</label>
                <div class="topjui-input-block">
		             <input type="text" name="roleid" id="roleid"
		                   data-toggle="topjui-combobox"
		                   data-options="required:true,
		               prompt:'必填',
		               valueField:'id',
		               textField:'text',
		               method:'get',
		               
		               onSelect:function(node){
		               		var tempid=node.id;//避免和下面加载成功后的回调函数参数同名
		               		$('form[id^=infoDg]:first').find('#uids').datalist({
		               			url:'/info/queryUserByroleid?roleid='+node.id,
		               			method: 'get', 
		        				valueField: 'id',//绑定字段ID            
		        				textField: 'text',//绑定字段Name   
	               				singleSelect:false,
	               				checkbox:true,
	               				onLoadSuccess:function(node,data){
		                      		if(tempid=='0')
		                      		{
		                      			debugger;
		                      			for(var i=0;i<node.total;i++)
		                      			{
		                      				$('#uids').datalist('checkRow',i);
		                      			}
		                      			
		                      		}
	                      		
	                      		}
		               		});
		               },
		               
		               
		               onLoadSuccess:function(data){
		               		
		               },
		               url:'/info/queryRole'">
                </div>
            </div>
            <div class="topjui-col-sm6">
                <label class="topjui-form-label">请选择人员：</label>
                <div class="topjui-input-block">

					<input id="uids" type="text" name="uids" class="textbox-f" data-toggle="topjui-datalist" style="height: 180px"
                            data-options="required:true,prompt:'必填',
                            method:'get',
                            textField:'text',
                            valueField:'id',
                            onLoadSuccess:function(node,data){
	                      	},
	                      	singleSelect:false "/>


                </div>
            </div>

        </div>

    </div>
</body>
</html>